package com.weseal.enums;

/**
 * @author weseal
 * @title
 * @description
 * @usage
 * @copyright Copyright 2014  rrmj Corporation. All rights reserved.
 * @company 上海众多美网络科技有限公司
 * @create 2017/11/6
 */
public enum PartStatus implements BaseEnum<PartStatus, Integer> {

	INIT(1, "初始化"),
	NO_STARTED(2, "未开始"),
	PROCESS(3, "活动进行中"),
	ACTIVITY_END(4, "活动结束"),
	BALANCE_ACCOUNT(5, "薪资结算中"),
	FINALLY(6, "结束");


	private int code;
	private String message;


	PartStatus(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public static PartStatus getByCode(int code) {
		for (PartStatus type : PartStatus.values()) {
			if (type.getCode().equals(code)) {
				return type;
			}
		}
		return null;
	}

	@Override
	public Integer getCode() {
		return this.code;
	}

	@Override
	public String getMessage() {
		return this.message;
	}
}
